//=============================================================================
// GlobalValue.as
// 
// 
// AUTHOR:             Jay Liang
// 
//                  Copyright (c) 2011 Break Media
//                              All Rights Reserved.
//                          
//=============================================================================
package values.other
{
public class GlobalValue
{    
    private static var _data:* = {};
    
    public function get data():*
    {
        return _data;
    }
    
    [Data(type="field", mapping="*")]
    public function set data(value:*):void
    {
        var node:XMLList = XMLList(value);
        var name:String = node.name();
        var value:* = String(value);
        if (isNaN(Number(value)))
        {
            _data[name] = String(value);
        }
        else
        {
            _data[name] = Number(value);
        }
    }
    
    public static function get staticData():*
    {
        return _data;
    }
}
}